Skip to content

Instantly share code, notes, and snippets.

@mignonstyle
mignonstyle / markdown-cheatsheet.md
Last active May 21, 2024 18:05
Markdown記法 チートシート

Block Elements ## Headers 見出し 先頭に#をレベルの数だけ記述します。 ```

見出し1

見出し2

見出し3

見出し4

見出し5
見出し6
## 見出し2
### 見出し3
#### 見出し4
##### 見出し5
###### 見出し6 ## Block 段落 空白行を挟むことで段落となります。 ```
段落1
(空行)
段落2
``` 段落1 段落2 ## Br 改行 改行の前に半角スペース` `を2つ記述します。 ```
hoge
fuga(スペース2つ)
piyo
``` hoge
fuga piyo ## Blockquotes 引用 先頭に`>`を記述します。ネストは`>`を多重に記述します。 ```
> 引用 > 引用
>> 多重引用
``` > 引用 > 引用
>> 多重引用 ## Code コード `` `バッククオート` `` 3つ、あるいはダッシュ`~`3つで囲みます。 ```
print 'hoge'
``` ```
print 'hoge'
``` ### インラインコード `` `バッククオート` `` で単語を囲むとインラインコードになります。 ```
これは `インラインコード`です。
``` これは `インラインコード`です。 ## pre 整形済みテキスト 半角スペース4個もしくはタブで、コードブロックをpre表示できます ``` class Hoge def hoge print 'hoge' end end
``` class Hoge def hoge print 'hoge' end end ## Hr 水平線 アンダースコア`_` 、アスタリスク`*`、ハイフン`-`などを3つ以上連続して記述します。 ```
hoge
***
hoge
___
hoge
---
``` hoge
***
hoge
___
hoge
--- # Lists ## Ul 箇条書きリスト ハイフン`-`、プラス`+`、アスタリスク`*`のいずれかを先頭に記
@truemogician
truemogician / upgrading_postgresql_in_windows.md
Last active May 21, 2024 18:05
Upgrading PostgreSQL in Windows

Upgrading PostgreSQL in Windows

The official documentation for PostgreSQL provides a guide to upgrading using pg_upgrade. However, it can be a bit like a treasure hunt with hidden traps. This gist will walk you through a clear and robust method for upgrading PostgreSQL on Windows, using the upgrade from version 14 to 16 as an example.

1. Install the New Version of PostgreSQL

Before you embark on the upgrade journey, make sure you have the new version installed. This is because the pg_upgrade utility used during the upgrade process belongs to the newer version.

To get started, visit the official download page, download the installer, and run it. A word of caution: do not overwrite the old installation, as you'll need its binaries and data for the upgrade.

@tetratorus
tetratorus / stream.py
Created May 9, 2024 13:35
Port of VAD stream example from whisper.cpp for lightning-whisper-mlx
import pyaudio
import wave
import numpy as np
from datetime import datetime
from scipy.io.wavfile import write
import tempfile
import os
from lightning_whisper_mlx import LightningWhisperMLX
# Constants
@tiagosampaio
tiagosampaio / README.md
Created May 21, 2024 18:03
Magento 2: UI Components Debug Reference Sheet

Magento 2: UI Components Debug Reference Sheet

Here are some examples of how to debug UI Components in Magento 2.

Get all UI Components registered on the page

require('uiRegistry').get(ui => console.log(ui.name));

Inspect a single given component

@pgtwitter
pgtwitter / file.frag
Last active May 21, 2024 18:01
audio visualizer on glsl-livecoder( https://atom.io/packages/glsl-livecoder )
//audio visualizer on glsl-livecoder ( https://atom.io/packages/glsl-livecoder )
precision mediump float;
uniform float time;
uniform vec2 resolution;
uniform sampler2D spectrum;
uniform sampler2D samples;
uniform float volume;
uniform sampler2D backbuffer;
float PI = 3.14159265359;
@realvjy
realvjy / ChoasLinesShader.metal
Last active May 21, 2024 18:00
Choas Lines - Metal Shader
// Lines
float hash( float n ) {
return fract(sin(n)*753.5453123);
}
// Slight modification of iq's noise function.
float noise(vector_float2 x )
{
vector_float2 p = floor(x);
vector_float2 f = fract(x);
@BenyamWorku
BenyamWorku / destructuring.js
Created March 28, 2021 13:03 — forked from szemate/destructuring.js
Destructuring exercises
/**
Exercise 1
Rewrite the code below to use array destructuring instead of assigning each value to a variable.
*/
{
console.log("EXERCISE 1");
let item = ["Egg", 0.25, 12];
@a-maumau
a-maumau / nvme_mount.md
Last active May 21, 2024 17:58
how to mount m.2 ssd/hdd
{"name":"Parsas Profile","settings":"{\"settings\":\"{\\n \\\"prettier.printWidth\\\": 180,\\n \\\"[typescriptreact]\\\": {\\n \\\"editor.defaultFormatter\\\": \\\"esbenp.prettier-vscode\\\"\\n },\\n \\\"prettier.jsxSingleQuote\\\": true,\\n \\\"prettier.singleQuote\\\": true,\\n \\\"[python]\\\": {\\n \\\"editor.formatOnType\\\": true,\\n \\\"editor.defaultFormatter\\\": \\\"ms-python.python\\\"\\n },\\n \\\"tabnine.experimentalAutoImports\\\": true,\\n \\\"editor.inlineSuggest.enabled\\\": true,\\n \\\"liveServer.settings.donotShowInfoMsg\\\": true,\\n \\\"[css]\\\": {\\n \\\"editor.defaultFormatter\\\": \\\"esbenp.prettier-vscode\\\"\\n },\\n \\\"[json]\\\": {\\n \\\"editor.defaultFormatter\\\": \\\"esbenp.prettier-vscode\\\"\\n },\\n \\\"[typescript]\\\": {\\n \\\"editor.defaultFormatter\\\": \\\"esbenp.prettier-vscode\\\"\\n },\\n \\\"[html]\\\": {\\n \\\"editor.defaultFormatter\\\": \\\"esbenp.prettier-vs